<template>
  <div class="svgIcon">
    <svg :style="{width,height}">
      <use :xlink:href="prefix+name" :fill="color"></use>
    </svg>
  </div>
</template>

<script setup lang="ts">
const prefix='#icon-'
const props = defineProps({
  name: {
    type: String,
    default: ''
  },
  color: {
    type: String,
    default: '#333'
  },
  width: {
    type: String,
    default: '20'
  },
  height: {
    type: String,
    default: '20'
  }
})
</script>

<style lang="scss" scoped>
.svgIcon{
  line-height: 100%;
  margin-right: 5px;
}
</style>